package com.hejielife.singlethreadedexecution3;

/**
 * 2019年8月2日 上午10:29:42
 * 
 * @author hejielife
 * @despribe 把多个竞争的资源打包为一个，破坏死锁的条件
 */
public class Main2 {
	public static void main(String[] args) {
		System.out.println("Testing EaterThread, hit CTRL+C to exit.");
		Tool spoon = new Tool("Spoon");
		Tool fork = new Tool("Fork");
		Pair pair = new Pair(spoon, fork);
		new EaterThread2("Alice", pair).start();
		new EaterThread2("Bobby", pair).start();
	}
}
